//数据库测试文件
// var goods = require('./good')
// var user = require('./user')
var todoitems = require('./items')
//items 测试文件
function iteminsert() {
	var item = new todoitems({
		// {id:1,content:'aaaa',completed:false},
		id:1,
		content:'aaaa',
		completed:false
	})
	item.save(function (err, res) {
		if (err) {
			console.log("Error:" + err);
		}
		else {
			console.log("Res:" + res);
		}
	});
}
iteminsert()
function insert() {

  var user = new goods({
    "productId": "1001",
    "productName": "音响",
    "productPrice": 166,
    "productImg": "1.jpg"
  });

  user.save(function (err, res) {
    if (err) {
      console.log("Error:" + err);
    }
    else {
      console.log("Res:" + res);
    }
  });
}

// insert();

//user 测试文件:

function usertest(){
  var usertest = new user({
    "userId":10000077,
    "userName":'xhh',
    "userPwd":123456,
    "orderList":[],
    "cartList":[],
    "addressList":[]
  });
  usertest.save(function (err, res) {
    if (err) {
      console.log("Error:" + err);
    }
    else {
      console.log("Res:" + res);
    }
  });
}
// usertest();

